package xna.android;

import android.graphics.Point;
import android.view.Display;

public class Tela {

	Display display;
	Point point = new Point();
	boolean touched;
		
	
	public void tela() {
	
		try { 
			display.getSize(point); 
	    } catch (java.lang.NoSuchMethodError ignore) { // Older device 
	        point.x = display.getWidth(); 
	        point.y = display.getHeight(); 
	    } 
	 
	}
	
	public void setTouched(boolean touched){
		this.touched = touched;
	}
	
	public boolean isTouched(){
		return touched;
	}
	
	public void handleActionDown(int eventX, int eventY){
		
		if (eventX <= point.x || eventY <= point.y)
		{
			setTouched(true);
		} 
		else 
		{
			setTouched(false);
		}
		
	}
	
	

}
